<template>
  <div>
    <van-nav-bar title="地址管理" left-arrow @click-left="onClickLeft">
      <template #right>
        <van-icon name="ellipsis" size="18" />
      </template>
    </van-nav-bar>
    <div class="foot">
      <van-button type="primary" size="large" round @click="add"
        >新增地址</van-button
      >
    </div>
  </div>
</template>

<script>
import { reactive, toRefs, onMounted, computed } from 'vue'
import { goodsList, goodsNum, goodsDel } from '../../request/goods.js'
import { Toast, Dialog } from 'vant'
import { useRouter, useRoute } from 'vue-router'
import { detail, address, addressz } from '../../request/api.js'
export default {
  setup() {
    const onClickLeft = () => history.back()
    const router = useRouter()
    const route = useRoute()
    onMounted(async () => {
      const { data } = await addressz()
      console.log(data)
    })
    const add = () => {
      router.push({ path: '/weizhi1' })
    }
    return {
      onClickLeft,
      add,
    }
  },
}
</script>

<style scoped lang="scss">
.foot {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  position: fixed;
  left: 0;
  bottom: 0;
}
</style>
